class Datagrid extends React.Component {
  constructor(props) {
      super(props);
      this.state = {
    data:[]
    };
  }
 
  componentDidMount() {
    var success = function(response){
      var lastGist = result[0];
      this.setState({
            username: lastGist.owner.login,
            lastGistUrl: lastGist.html_url
          });
      }.bind(this);

      debugger
      
      this.serverRequest = $.ajax({
          url:this.props.dataUrl,
          method:this.props.method,
          success:success
      });
  }

  render () {
    return (
      <div>
        <div>{this.props.title}</div>
    
      </div>
    );
  }
}
 
ReactDOM.render(
  <Datagrid title="world" method="POST" dataUrl="/users"/>,
  app
);